import request from '@/api/request'
export default {
  index() {
    return request({
      url: '/admin/parts/index',
      method: 'get'
    })
  },
  create(data) {
    return request({
      url: '/admin/parts/create',
      method: 'post',
      data
    })
  },
  update(data) {
    return request({
      url: '/admin/parts/update',
      method: 'post',
      data
    })
  },
  info(id) {
    return request({
      url: '/admin/parts/info',
      method: 'get',
      params: {
        id
      }
    })
  },
  delete(id) {
    return request({
      url: '/admin/parts/delete',
      method: 'get',
      params: {
        id
      }
    })
  },

  provider(data) {
    return request({
      url: '/admin/parts/provider',
      method: 'post',
      data
    })
  },

  providers(params) {
    return request({
      url: '/admin/parts/providerList',
      method: 'get',
      params
    })
  },

  providerDelete(id) {
    return request({
      url: '/admin/parts/providerDelete',
      method: 'get',
      params: {
        id
      }
    })
  },

  equipment(data) {
    return request({
      url: '/admin/parts/equipment',
      method: 'post',
      data
    })
  },

  equipmentDelete(id) {
    return request({
      url: '/admin/parts/equipmentDelete',
      method: 'get',
      params: {
        id
      }
    })
  },

  equipments(params) {
    return request({
      url: '/admin/parts/equipmentList',
      method: 'get',
      params
    })
  },
  plan(params) {
    return request({
      url: '/admin/parts/plan',
      method: 'get',
      params
    })
  },

  wordorder(params) {
    return request({
      url: '/admin/parts/wordorder',
      method: 'get',
      params
    })
  }
}
